﻿using System.Web.Http;

namespace Sportsbook.RestAPI.App_Start
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
           config.Routes.MapHttpRoute(
               name: "BetList",
               routeTemplate: "bet-list/{customerId}",
               defaults: new { controller = "BetList" }
           );

           config.Routes.MapHttpRoute(
             name: "BetSlip",
             routeTemplate: "bet-slip/{customerId}",
             defaults: new { controller = "BetSlip" }
           );

           config.Routes.MapHttpRoute(
            name: "Leagues",
            routeTemplate: "leagues/{sportId}/{filterType}",
            defaults: new { controller = "Leagues" }
           );

           config.Routes.MapHttpRoute(
               name: "Lines",
               routeTemplate: "lines/{sportId}/{filterType}/{leagueId}",
               defaults: new { controller = "Lines" }
           );

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );
        }
    }
}
